package cc.cix.hq.common.validate.code.service;


import cc.cix.hq.common.core.exception.HqException;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author cix
 */
public interface IValidateCodeService {

    /**
     * 创建图片验证码
     *
     * @param request
     * @return Map<String, String> json对象
     */
    Map<String, String> create(HttpServletRequest request);

    /**
     * 校验验证码
     *
     * @param key   redis key
     * @param value
     * @throws HqException
     */
    void check(String key, String value) throws HqException;

}
